package com.web.controller;

import com.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;
import java.util.List;
@Controller
@RequestMapping("/studentController")
public class StudentController {
    @RequestMapping("/students")
    @ResponseBody
   public List<Student> getAll(){
        System.out.println("getAll");
       List<Student> students = Arrays.asList(new Student[]{new Student("0907", "冉豪"), new Student("0902", "罗毅"), new Student("0901", "严烽桃")});
       return students;
   }


}
